package com.situ.mall.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.situ.mall.pojo.entity.Category;
import com.situ.mall.pojo.vo.CategoryCountVO;

public interface CategoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

	List<Category> selectByPage(@Param(value = "offset")int offset, @Param(value = "limit")Integer limit, @Param(value = "name")String name);

	int selectTotalCount(@Param(value = "name")String name);

	int deleteAllByArray(Integer[] ids);

	List<Category> selectTopCategory();

	List<Category> selectSecondCategory(Integer id);

	List<CategoryCountVO> selectCategoryCount();

	List<Category> selectSecondCategoryToFront();

	Integer selectParentIdByProduct(Integer categoryId);
}